home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 04 - 1988 / 04.08 Aug 88 / Fortran Stuff / prtrap.inc < prev   
Encoding:
Text File  |  1988-06-23  |  5.4 KB  |  137 lines  |  [TEXT/EDIT]

  1. * File: prtrap.inc      29 Dec 1987       JHL
  2. *     A replacement for Absoft's prport.inc and prport.sub .
  3. *     This implements traps for Fortran so that it can be used with toolbx.sub .
  4. *     Culled together by J. Lieske, Jet Propulsion Laboratory, based upon
  5. *     Inside Mac V and Lightspeed Pascal equates.
  6. *
  7. *     The general calling sequence for procedures is
  8. *           CALL TOOLBX(PrRoutine, Args, xPrRoutine)
  9. *     while that for a function is 
  10. *           TOOLBX(PrRoutine, Args, xPrRoutine) .
  11. *     In the above parameters, PrRoutine is the encoded PrGlue (Printer Trap
  12. *     $A8FD) parameter and xPrRoutine is the 'call number' as specified in
  13. *     Inside Mac V Chapter 22.  The 'Args' are the sequence of arguments to
  14. *     the procedure or function as specified by Inside Mac.  
  15. *           Basically, the xPrRoutine 'call number' is placed on the stack
  16. *     just ahead of the printer trap number ($A8FD) and the Fortran PrRoutine
  17. *     parameter tells Fortran's TOOLBX how to interpret the 'Args' and
  18. *     'xPrRoutine' values.
  19. *           For example, the routine PrintDefault is called from 
  20. *     Fortran as follows:  CALL TOOLBX( PRINTDEFAULT, hPrint, xPRINTDEFAULT) .
  21. *
  22. * * * * * * * * * * * * * * * * * * * * *
  23. *     Modification history:
  24. *     12/87 JHL   Developed basic parameters from Absoft's documentation
  25. *                 of toolbx.sub and Apple's Inside Mac V and Lightspeed
  26. *                 Pascal.
  27. * * * * * * * * * * * * * * * * * * * * *
  28. * PROCEDURE PrOpen; 
  29.       INTEGER*4 PROPEN, xPROPEN
  30.       PARAMETER (PROPEN=Z'8FD10000', xPROPEN=Z'C8000000')
  31.  
  32. * PROCEDURE PrClose; 
  33.       INTEGER*4 PRCLOSE, xPRCLOSE
  34.       PARAMETER (PRCLOSE=Z'8FD10000', xPRCLOSE=Z'D0000000')
  35.  
  36. * PROCEDURE PrintDefault (hPrint: THPrint);
  37.       INTEGER*4 PRINTDEFAULT, xPRINTDEFAULT
  38.       PARAMETER (PRINTDEFAULT=Z'8FD12000', xPRINTDEFAULT=Z'20040480')
  39.  
  40. * FUNCTION PrValidate (hPrint: THPrint) : BOOLEAN;
  41.       INTEGER*4 PRVALIDATE, xPRVALIDATE
  42.       PARAMETER (PRVALIDATE=Z'8FDD2000', xPRVALIDATE=Z'52040498')
  43.  
  44. * FUNCTION PrStlDialog (hPrint: THPrint) : BOOLEAN;
  45.       INTEGER*4 PRSTLDIALOG, xPRSTLDIALOG
  46.       PARAMETER (PRSTLDIALOG=Z'8FDD2000', xPRSTLDIALOG=Z'2A040484')
  47.  
  48. * FUNCTION PrJobDialog (hPrint: THPrint) : BOOLEAN;
  49.       INTEGER*4 PRJOBDIALOG, xPRJOBDIALOG
  50.       PARAMETER (PRJOBDIALOG=Z'8FDD2000', xPRJOBDIALOG=Z'32040488')
  51.  
  52. * PROCEDURE PrJobMerge (hPrintSrc, hPrintDst: THPrint);
  53.       INTEGER*4 PRJOBMERGE, xPRJOBMERGE
  54.       PARAMETER (PRJOBMERGE=Z'8FD12400', xPRJOBMERGE=Z'5804089C')
  55.  
  56. * FUNCTION PrOpenDoc (hPrint: THPrint; pPrPort: TPPrPort;
  57. *                 pIOBuf: Ptr) : TpPrPort;
  58.       INTEGER*4 PROPENDOC, xPROPENDOC
  59.       PARAMETER (PROPENDOC=Z'8FD92480', xPROPENDOC=Z'04000C00')
  60.  
  61. * PROCEDURE PrCloseDoc (pPrPort: TPPrPort);
  62.       INTEGER*4 PRCLOSEDOC, xPRCLOSEDOC
  63.       PARAMETER (PRCLOSEDOC=Z'8FD12000', xPRCLOSEDOC=Z'08000484')
  64.  
  65. * PROCEDURE PrOpenPage (pPrPort: TPPrPort; pPageFrame: TPRect);
  66.       INTEGER PROPENPAGE, xPROPENPAGE
  67.       PARAMETER (PROPENPAGE=Z'8FD12400', xPROPENPAGE=Z'10000808')
  68.  
  69. * PROCEDURE PrClosePage (pPrPort: TPPrPort);
  70.       INTEGER*4 PRCLOSEPAGE, xPRCLOSEPAGE
  71.       PARAMETER (PRCLOSEPAGE=Z'8FD12000', xPRCLOSEPAGE=Z'1800040C')
  72.  
  73.  
  74. * Note: prStatus should actually be passed as a pointer to a TPrStatus
  75. *     record.
  76. * PROCEDURE PrPicFile (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr;
  77. *                 pDevBuf: Ptr; VAR prStatus: TPrStatus);
  78.       INTEGER*4 PRPICFILE, xPRPICFILE
  79.       PARAMETER (PRPICFILE=Z'8FD124B2', xPRPICFILE=Z'60051480')
  80.  
  81. * FUNCTION PrError : INTEGER;
  82.       INTEGER*4 PRERROR, xPRERROR
  83.       PARAMETER (PRERROR=Z'8FD50000', xPRERROR=Z'BA000000')
  84.  
  85. * PROCEDURE PrSetError(iErr : INTEGER);
  86.       INTEGER*4 PRSETERROR, xPRSETERROR
  87.       PARAMETER (PRSETERROR=Z'8FD0A000', xPRSETERROR=Z'C0000200')
  88.  
  89. * PROCEDURE PrDrvrOpen;
  90.       INTEGER*4 PRDRVROPEN, xPRDRVROPEN
  91.       PARAMETER (PRDRVROPEN=Z'8FD10000', xPRDRVROPEN=Z'80000000')
  92.  
  93. * PROCEDURE PrDrvrClose;
  94.       INTEGER*4 PRDRVRCLOSE, xPRDRVRCLOSE
  95.       PARAMETER (PRDRVRCLOSE=Z'8FD10000', xPRDRVRCLOSE=Z'88000000')
  96.  
  97. * PROCEDURE PrCtlCall(iWhichCtl: Integer; lParam1, lparam2, lparam3: LongInt);
  98.       INTEGER*4 PRCTLCALL, xPRCTLCALL
  99.       PARAMETER (PRCTLCALL=Z'8FD0A490', xPRCTLCALL=Z'A0000E00')
  100.  
  101. * FUNCTION PrDrvrDCE: Handle;
  102.       INTEGER*4 PRDRVRDCE, xPRDRVRDCE
  103.       PARAMETER (PRDRVRDCE=Z'8FD90000', xPRDRVRDCE=Z'94000000')
  104.  
  105. * FUNCTION PrDrvrVers: Integer;
  106.       INTEGER*4 PRDRVRVERS, xPRDRVRVERS
  107.       PARAMETER (PRDRVRVERS=Z'8FD50000', xPRDRVRVERS=Z'9A000000')
  108.  
  109. * PROCEDURE PrGeneral(pData: Ptr);
  110.       INTEGER*4 PRGENERAL, xPRGENERAL
  111.       PARAMETER (PRGENERAL=Z'8FD12000', xPRGENERAL=Z'70070480')
  112. * PrGeneral is the gateway to the calls documented in Inside Mac V
  113. * concerning added capabilities for printer resolution, etc.
  114. * See the file PrGenDefs.inc and the demo program for usage
  115.  
  116. * PROCEDURE PrPurge;
  117.       INTEGER*4 PRPURGE, xPRPURGE
  118.       PARAMETER (PRPURGE=Z'8FD10000', xPRPURGE=Z'A8000000')
  119.  
  120. * PROCEDURE PrNoPurge;
  121.       INTEGER*4 PRNOPURGE, xPRNOPURGE
  122.       PARAMETER (PRNOPURGE=Z'8FD10000', xPRNOPURGE=Z'B0000000')
  123.  
  124. * FUNCTION PrStlInit (hPrint: THPrint): TPPrDlg;
  125.       INTEGER*4 PRSTLINIT, xPRSTLINIT
  126.       PARAMETER (PRSTLINIT=Z'8FD92000', xPRSTLINIT=Z'3C04040C')
  127.  
  128. * FUNCTION PrJobInit (hPrint: THPrint): TPPrDlg;
  129.       INTEGER*4 PRJOBINIT, xPRJOBINIT
  130.       PARAMETER (PRJOBINIT=Z'8FD92000', xPRJOBINIT=Z'44040410')
  131.  
  132. * FUNCTION PrDlgMain(hPrint: THPrint; pDlgInit: ProcPtr): Boolean;
  133.       INTEGER*4 PRDLGMAIN, xPRDLGMAIN
  134.       PARAMETER (PRDLGMAIN=Z'8FDD2400', xPRDLGMAIN=Z'4A040894')
  135.  
  136. * end of prtrap.inc listing
  137.